#include "slist.h"
void test1()
{
	SListNode* plist = NULL;
	SListInit(&plist);
	SListPushBack(&plist, 4);
	//SListPushBack(&plist, 21);
	SListPushBack(&plist, 23);
	//SListPushBack(&plist, 6);
	SListPushBack(&plist, 5);
	SListPrint(plist);
	SListNode* n1 = SListFind(plist, 4);
	//printf("%d\n", (int)n1);
	SLTErase(&plist, n1);
	SListPrint(plist);

}

void test2()
{
	SListNode* plist = NULL;
	SListInit(&plist);
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListPrint(plist);
	SListNode* ret = SListFind(plist, 4);
	//SLTErase(&plist, ret);
	//SListPrint(plist);
	SListInsertAfter(plist, 10);
	SListPrint(plist);
	SListEraseAfter(ret);
	SListPrint(plist);
	SLTInsert(&plist, ret, 28);
	SListPrint(plist);

}

int main()
{
	//test1();
	test2();
	return 0;
}